<script lang="ts" setup>
import { ref } from 'vue'
import { ElMessageBox } from 'element-plus'
//弹框开关变量
const dialogVisible = ref(false)

const handleClose = ()=>{

}

//控制弹框的方法
const show=(val)=>{
    dialogVisible.value=val
}

//向父组件暴露变量或者方法
defineExpose({
    //1.暴露变量
    dialogVisible,
    //暴露方法
   show
})
</script>

<template>

  <el-dialog
    v-model="dialogVisible"
    title="Tips"
    width="500"
    :before-close="handleClose"
  >
    <span></span>
    <template #footer>
      <div class="dialog-footer">
        <el-button @click="dialogVisible = false">Cancel</el-button>
        <el-button type="primary" @click="dialogVisible = false">
          Confirm
        </el-button>
      </div>
    </template>
  </el-dialog>



</template>



<style scoped>

</style>